{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import sys\n",
    "import torch\n",
    "import random\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['block_rubble_all_lr_c12_loss_10_r4.npy', 'block_rubble_all_lr_c9_loss_10_r4.npy', 'block_rubble_all_lr_c4_loss_10_r4.npy', 'block_rubble_all_lr_c25_loss_10_r4.npy', 'block_rubble_all_lr_c9_loss_12_r4.npy', 'block_rubble_all_lr_c9_loss_14_r4.npy']\n"
     ]
    }
   ],
   "source": [
    "path = \"../data/mill19/rubble-pixsfm/train/data_partitions\"\n",
    "files = [f for f in os.listdir(path) if f.endswith('.npy')]\n",
    "print(files)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "block_rubble_all_lr_c12_loss_10_r4.npy 432 124\n",
      "block_rubble_all_lr_c9_loss_10_r4.npy 552 128\n",
      "block_rubble_all_lr_c4_loss_10_r4.npy 835 68\n",
      "block_rubble_all_lr_c25_loss_10_r4.npy 355 115\n",
      "block_rubble_all_lr_c9_loss_12_r4.npy 469 145\n",
      "block_rubble_all_lr_c9_loss_14_r4.npy 415 148\n"
     ]
    }
   ],
   "source": [
    "distributions = []\n",
    "for f in files:\n",
    "    partition = np.load(os.path.join(path, f))\n",
    "    distribution = partition.sum(axis=0)\n",
    "    mean = int(distribution.mean())\n",
    "    std = int(distribution.std())\n",
    "    distributions.append(partition.sum(axis=0))\n",
    "    print(f, mean, std)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "gaussian_splatting",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
